﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace PlanInterfejs
{
    public partial class MainForm : Form
    {
        PlanView _view = new PlanView();

        public MainForm()
        {
            InitializeComponent();
            InitializeViews();
        }

        private void nextButton_Click(object sender, EventArgs e)
        {
            if (tabControl.SelectedIndex < tabControl.TabCount)
                tabControl.SelectedIndex++;
        }

        private void backButton_Click(object sender, EventArgs e)
        {
            if (tabControl.SelectedIndex > 0)
                tabControl.SelectedIndex--;
        }

        private void tabControl_SelectedIndexChanged(object sender, EventArgs e)
        {
            backButton.Visible = tabControl.SelectedIndex != 0;
            nextButton.Visible = tabControl.SelectedIndex != tabControl.TabCount - 1;
        }
        void InitializeViews()
        {
            podsumowanieControl1.View = _view;
        }

        private void podsumowanieControl1_Load(object sender, EventArgs e)
        {

        }

    }
}
